<?php
/*
 * Created on 22.12.2005
 *
 */

// TODO add target attribute, if validate name is required
class ajax_requireHandler
{
    
    var $name = null;

    function startElement (& $sender, $attrs, $line)
    {
        if (empty($attrs['value']))
            die("Attribute value is missing in ajax:dojo in line $line\n");
        $sender->appendCode('$out->write("dojo.require('.$attrs['value'].');\n");'."\n");
    }

    function endElement (& $sender)
    {
    }

}

?>